/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package gov.nasa.jpf.search.heuristic;

/**
 *
 * @author Frank
 */
public class Domain {

    private int from;
    private int to;

    public boolean contains(int val) {
        if (val >= from && val <= to) {
            return true;
        }
        return false;
    }

    public Domain(int from, int to) {
        this.from = from;
        this.to = to;
    }

    public int getFrom() {
        return from;
    }

    public int getTo() {
        return to;
    }

    @Override
    public boolean equals(Object obj) {
        if (obj instanceof Domain) {
            Domain d = (Domain) obj;
            return d.from == from && d.to == to;
        }
        return false;
    }
}
